﻿@{
    ViewBag.Title = "PromotionInfo";
}
@section scripts
{
    <script src="@Url.Content("~/Scripts/shared/share.js")" type="text/javascript"></script> 
    <script src="@Url.Content("~/Scripts/shared/shown.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/Base/temp.js?v=Date()")" type="text/javascript"></script>
    <link href="~/Scripts/miniui/themes/default/medium-mode.css" rel="stylesheet" type="text/css" />      
}

<form id="form1" method="post">
            @Html.Partial("~/Views/Modular/Toolbars.cshtml")
    <div id="tabs1" class="mini-tabs" activeIndex="0"  style="width:100%; height:100%; top: 0px; left: 0px;overflow:hidden;" plain="false"  buttons="#tabsButtons">
            <div name="Scheme" title="方案编辑" style="height:100%;overflow:hidden;margin-left:20px; margin-top:5px;">
                <table style="margin-top:10px;">
                    <tr>
                        <td width="80px" height ="35px" align="right">
                            方案编码：</td>
                        <td width="200px" height ="35px">
                            <input name="FNumber" id="FNumber" class="mini-textbox" style="width:190px;" required="true" value="" TabIndex="1" maxLength="20"/>
                        </td>
                        <td width="80px" height ="35px" align="right">
                            促销人群：</td>
                        <td>
                            <input id="combo1" class="mini-combobox" style="width:190px;" textField="text" valueField="id" emptyText="请选择..."
                                data="Memtype" value="0"  required="true" allowInput="true" showNullItem="true" nullItemText="请选择..."/>  
                        </td>
                    </tr>
                    <tr>
                        <td width="80px" height ="35px" align="right">
                            方案名称：</td>
                        <td width="200px" height ="35px">
                            <input id="FName" name="FName" class="mini-textbox " style="width:190px;" required="true" TabIndex="2"  maxLength="50"/>
                        </td>
                        <td width="80px" height ="35px" align="right">
                            分店选择：</td>
                        <td width="200px" height ="35px">
                            <input id="FStocks" name="FStocks" class="mini-buttonedit" style="width:190px;" onbuttonclick="getStockItem('')" selectOnFocus="true" placeholder="未选择即全部参与" />
                        </td>
                   </tr>
                    <tr>
                        <td width="80px" height ="35px" align="right">
                            开始日期：</td>
                        <td width="200px" height ="35px">
                            <input class="mini-datepicker" name="FStartDate" format="yyyy-MM-dd" style="width:190px;" required="true" value = ""/>
                        </td>
                        <td width="80px" height ="35px" align="right">
                            开始时段：</td>
                        <td width="200px" height ="35px">
                            <input name="FStartTimeHH1" class="mini-spinner" style="width: 75px;" minValue="0" maxValue="23" required="true"
                            changeOnMousewheel ="false" value="08" TabIndex="3"/> 时
                            <input name="FStartTimeMM2" class="mini-spinner" style="width: 75px;" minValue="0" maxValue="59" required="true"
                            changeOnMousewheel ="false" value="00" TabIndex="3"/> 分
                        </td>
                    </tr>
                    <tr>
                        <td width="80px" height ="35px" align="right">
                            结束日期：</td>
                        <td width="200px" height ="35px">
                            <input class="mini-datepicker" name="FEndDate" format="yyyy-MM-dd" style="width:190px;" required="true" value = ""/>
                        </td>
                        <td width="80px" height ="35px" align="right">
                            结束时段：</td>
                        <td width="200px" height ="35px">
                            <input name="FEndTimeHH1" class="mini-spinner" style="width: 75px;" minValue="0" maxValue="23" required="true"
                            changeOnMousewheel ="false" value="08" TabIndex="3"/> 时 
                            <input name="FEndTimeMM2" class="mini-spinner" style="width: 75px;" minValue="0" maxValue="59" required="true"
                            changeOnMousewheel ="false" value="00" TabIndex="3"/> 分 
                        </td>
                    </tr>
                    <tr>
                        <td width="80px" height ="35px" align="right">
                            星期选择：</td>
                        <td width="200px" height ="35px" colspan="3">
                            <div id="week1" name="week1"  class="mini-checkbox" readOnly="false" text="星期一" style="margin-right:7px;"></div>
                            <div id="week2" name="week2"  class="mini-checkbox" readOnly="false" text="星期二" style="margin-right:7px;"></div>
                            <div id="week3" name="week3"  class="mini-checkbox" readOnly="false" text="星期三" style="margin-right:7px;"></div>
                            <div id="week4" name="week4"  class="mini-checkbox" readOnly="false" text="星期四" style="margin-right:7px;"></div>
                            <div id="week5" name="week5"  class="mini-checkbox" readOnly="false" text="星期五" style="margin-right:7px;"></div>
                            <div id="week6" name="week6"  class="mini-checkbox" readOnly="false" text="星期六" style="margin-right:7px;"></div>
                            <div id="week0" name="week0"  class="mini-checkbox" readOnly="false" text="星期日" ></div>
                       </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td colspan="3">
                            <div id="ckonline" name="ckonline"  class="mini-checkbox" readOnly="false" text="线上" onvaluechanged="onValueChanged"  style="margin-right:20px;"></div>
                            <div id="ckline" name="ckline"  class="mini-checkbox" readOnly="false" text="线下" onvaluechanged="onValueChanged"></div>
                        </td>
                    </tr>
                    <tr><td></td><td colspan="3" style="color:#8c8c8c;">&nbsp;&nbsp;分店选择为空时即为全部分店参与促销，未选择星期时以方案时间为准。</td></tr>
                    <tr><td colspan="4">&nbsp;</td></tr>
                </table>
            </div>
            <div name="ProType" title="促销设置" style="height:100%;overflow:hidden;margin-left:20px; margin-top:0px;">
                <table style="margin-top:10px;width:100%;">
                    <tr>
                        <td style="text-align:center;border-bottom:1px solid #dddddd;">促销方式</td>
                        <td style="text-align:center;border-bottom:1px solid #dddddd;">条件设置</td>
                        <td style="text-align:center;border-bottom:1px solid #dddddd;"></td>
                    </tr>
                    <tr>
                        <td style="vertical-align:top;">
                            <div id="rbtype" class="mini-radiobuttonlist" repeatItems="10" repeatLayout="table" repeatDirection="vertical"
                                textField="text" valueField="id" value="1" url="Types.txt" style="margin-left:20px;">
                            </div> 
                        </td>
                        <td style="vertical-align:top;text-align:center;">
                            <div id="condgrid" class="mini-datagrid" style="width:300px;" showPager="false"  allowCellEdit="true" allowCellSelect="true"
                                    borderStyle="border:1;" fitColumns="false" sortMode="client" idField="FItemID" multiSelect="true">
                                <div property="columns">
                                    <div type="checkcolumn" width="40"></div>
                                    <div field="cvalue" name="cvalue" width="129px" headeralign="center" allowsort="true">满足条件
                                        <input property="editor" class="mini-spinner" style="width:100%;" minValue="0" maxValue="9999999" changeOnMousewheel ="false" fromat="#,0.00"/>
                                    </div>
                                    <div field="value" name="value" width="129px" headeralign="center" allowsort="true">促销值
                                        <input property="editor" class="mini-spinner" style="width:100%;" minValue="0" maxValue="9999999" changeOnMousewheel ="false" fromat="#,0.00"/>
                                    </div>
                                </div>
                            </div>
                        </td>
                        <td style="vertical-align:top;">
                        </td>
                        <td style="vertical-align:top;padding-top:10px;">
                            <a class="mini-button" name="addrow" name="fresh" iconCls="icon-add" onclick="addrow" plain="true">增加</a>
                             <a class="mini-button" name="cutrow" name="fresh" iconCls="icon-sub" onclick="cutrow" plain="true">减少</a>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <div id="context"></div>
                        </td>
                    </tr>
                </table>
            </div>
            <div name="Goods" title="促销商品" style="height:100%;overflow:hidden;margin-left:20px; margin-top:20px;">
                <table style="width:100%">
                    <tr>
                        <td colspan="3" style="padding-left:20px;">
                            <div id="ckAll" name="ckAll"  class="mini-checkbox" readOnly="false" text="全场商品" onvaluechanged="onValueChanged"></div>
                            <div id="ckType" name="ckType"  class="mini-checkbox" readOnly="false" text="商品分类" onvaluechanged="onValueChanged"></div>
                            <div id="ckBrand" name="ckBrand"  class="mini-checkbox" readOnly="false" text="商品品牌" onvaluechanged="onValueChanged"></div>
                            <div id="ckGood" name="ckGood"  class="mini-checkbox" readOnly="false" text="指定商品" onvaluechanged="onValueChanged"></div>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align:left;">
                            <div id="typeB">
                                <a class="mini-button"  iconCls="icon-add" plain="true" onclick="addClass">添加</a>
                                <a class="mini-button"  iconCls="icon-remove"  plain="true" onclick="removeClass">删除</a>
                            </div>
                        </td>
                        <td style="text-align:left;">
                            <div id="brandB">
                                <a class="mini-button"  iconCls="icon-add" plain="true" onclick="addBrand">添加</a>
                                <a class="mini-button"  iconCls="icon-remove" plain="true" onclick="removeBrand">删除</a>
                            </div>
                        </td>
                        <td style="text-align:left;">
                            <div id="goodB">
                                <a class="mini-button"  iconCls="icon-add" plain="true" onclick="addGood('datagrid2')">添加</a>
                                <a class="mini-button"  iconCls="icon-remove" plain="true" onclick="removeGood('datagrid2')">删除</a>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align:top;">
                            <div id="datagrid0" class="mini-datagrid" style="width:100%;" showPager="false"
                                borderStyle="border:1;" fitColumns="false"  sortMode="client" idField="FItemID">
                                <div property="columns">
                                    <div type="checkcolumn" width="40">选择</div>
                                    <div field="FNumber" width="100px" headerAlign="center">分类编码</div>    
                                    <div name="FName" field="FName" width="200px"  headerAlign="center">分类名称</div>     
                                </div>
                            </div>
                        </td>
                        <td style="vertical-align:top;">
                             <div id="datagrid1" class="mini-datagrid" style="width:100%;" showPager="false"
                                    borderStyle="border:1;" fitColumns="false" sortMode="client" idField="FItemID">
                                <div property="columns">
                                    <div type="checkcolumn" width="40">选择</div>
                                    <div field="FNumber" name="FNumber" width="100px" headeralign="center" allowsort="true">品牌编码</div>
                                    <div field="FName" name="FName" width="150px" headeralign="center" allowsort="true">品牌名称</div>
                                </div>
                            </div>
                        </td>
                        <td>
                             <div id="datagrid2" class="mini-datagrid" style="width:100%;" showPager="false"
                                    borderStyle="border:1;" fitColumns="false" sortMode="client" idField="FItemID" multiSelect="true">
                                <div property="columns">
                                    <div type="checkcolumn" width="40">选择</div>
                                    <div type="indexcolumn" width="40" headerAlign="center" >序号</div>
                                    <div field="FNumber" name="FNumber" width="100px" headeralign="center" allowsort="true">商品编码</div>
                                    <div field="FName" name="FName" width="150px" headeralign="center" allowsort="true">商品名称</div>
                                    <div field="FSpec" name="FSpec" width="80px" headeralign="center" allowsort="true">规格</div>
                                    <div field="FUnitName" name="FUnitName" width="60px" headeralign="center" allowsort="true">单位</div>
                                    <div field="FCode" name="FCode" width="120px" headeralign="center" allowsort="true">条码</div>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
            <div name="Present" title="赠送设置" style="height:100%;overflow:hidden;margin-left:20px; margin-top:20px;">
                <table style="width:100%">
                    <tr>
                        <td colspan="2" style="padding-left:20px;">
                            <div style="float:left;">
                                <div id="ckgoodP" name="ckgoodP"  class="mini-checkbox" readOnly="false" text="赠送商品" onvaluechanged="onPChanged"></div>&nbsp;&nbsp;
                                <div id="ckcouponP" name="ckcouponP"  class="mini-checkbox" readOnly="false" text="赠送礼券" onvaluechanged="onPChanged"></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            </div>
                            <div style="padding:2px;padding-left:20px;float:left;">
                                赠送商品：<input name="FPersentGNumber" class="mini-spinner" style="width: 75px;" minValue="0" maxValue="10" 
                            changeOnMousewheel ="false" value="0" TabIndex="10"/>&nbsp;个
                            </div>
                            <div style="padding:2px;padding-left:20px;float:left;">
                                赠送礼券：<input name="FPersentCNumber" class="mini-spinner" style="width: 75px;" minValue="0" maxValue="10" 
                            changeOnMousewheel ="false" value="0" TabIndex="10"/>&nbsp;张
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div id="goodP">
                                <a class="mini-button"  iconCls="icon-add" plain="true" onclick="addGood('datagrid3')">添加</a>
                                <a class="mini-button"  iconCls="icon-remove"  plain="true" onclick="removeGood('datagrid3')">删除</a>
                            </div>
                        </td>
                        <td>
                            <div id="couponP">
                                <a class="mini-button"  iconCls="icon-add" plain="true" onclick="addCoupon">添加</a>
                                <a class="mini-button"  iconCls="icon-remove"  plain="true" onclick="removeCoupon">删除</a>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                             <div id="datagrid3" class="mini-datagrid" style="width:100%;" showPager="false" allowCellEdit="true" allowCellSelect="true"
                                    borderStyle="border:1;" fitColumns="false" sortMode="client" idField="FItemID" multiSelect="true">
                                <div property="columns">
                                    <div type="checkcolumn" width="40">选择</div>
                                    <div type="indexcolumn" width="40" headerAlign="center" >序号</div>
                                    <div field="FNumber" name="FNumber" width="80px" headeralign="center" allowsort="true">商品编码</div>
                                    <div field="FName" name="FName" width="130px" headeralign="center" allowsort="true">商品名称</div>
                                    <div field="FSpec" name="FSpec" width="80px" headeralign="center" allowsort="true">规格</div>
                                    <div field="FUnitName" name="FUnitName" width="50px" headeralign="center" allowsort="true">单位</div>
                                    <div field="FCode" name="FCode" width="110px" headeralign="center" allowsort="true">条码</div>
                                    <div field="FPrice" name="FPrice" width="60px" headeralign="center" allowsort="true">单价
                                        <input property="editor" class="mini-textbox" style="width:100%;" vtype="float" fromat="#,0.00"/>
                                    </div>
                                </div>
                            </div>
                        </td>
                        <td>
                             <div id="datagrid4" class="mini-datagrid" style="width:100%;" showPager="false"
                                    borderStyle="border:1;" fitColumns="false" sortMode="client" idField="FItemID">
                                <div property="columns">
                                    <div type="checkcolumn" width="40">选择</div>
                                    <div type="indexcolumn" width="40" headerAlign="center" >序号</div>
                                    <div field="FNumber" name="FNumber" width="100px" headeralign="center" allowsort="true">礼券编码</div>
                                    <div field="FName" name="FName" width="150px" headeralign="center" allowsort="true">礼券名称
                                    </div>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
    </div>
    <input name="FItemID" value="0" class="mini-hidden" />
</form>

